package com.qf.feign;

import com.qf.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lyx
 * @date 2022/7/6 21:00
 */
//指定被调用放的微服务名
@FeignClient(name = "QF-SEARCH",fallback = SearcjFeingnFallback.class)
@RestController
@RequestMapping("/search")
public interface SearchFeign {
    @RequestMapping("/test")
    public String test1();


    @RequestMapping("/query/{id}")
    public User findUserId(@PathVariable("id")Integer id);

    }

